package com.apiclient;

import com.api2.TestApi2;

import java.lang.reflect.Proxy;
import java.text.SimpleDateFormat;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2020/11/9  15:40
 * 描述:
 */
public class TestApiClientMain {
    public static void main(String[] args) {


        TestMyInvocation testMyInvocation=new TestMyInvocation("com.service3.TestService2");

        Class<TestApi2> testApi2Class = TestApi2.class;

        Class<?>[] uuu={testApi2Class};

        TestApi2 testApi2= (TestApi2) Proxy.newProxyInstance(testApi2Class.getClassLoader(),uuu,testMyInvocation);

        String sdf=new SimpleDateFormat("yyyy-MM-dd mm:ss").format(System.currentTimeMillis())+"**";
        String test0002 = testApi2.test0002("我是发发"+sdf);

        System.out.println("-----客户端接收数据----"+test0002);

    }











}
